perm filename BOO.STY[B2,JMC] blob sn#760761 filedate 1984-07-05 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00012 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00003 00002	% REPORT DOCUMENT STYLE -- version 0.83 - released 13 Jan 1984
C00004 00003	%    *               FONTS                  *
C00006 00004	%    *            PAGE STYLES               *
C00011 00005	%    *            SUBSTYLES                 *
C00013 00006	%    *           ENVIRONMENTS               *
C00020 00007	%    *        CHAPTERS AND SECTIONS         *
C00029 00008	%    *             APPENDIX                 *
C00031 00009	%    *             FOOTNOTES                *
C00032 00010	%  equation -- must follow \chapter definition
C00033 00011	%    *         FIGURES AND TABLES           *
C00037 00012	%    *           INITIALIZATION             *
C00038 ENDMK
CāŠ—;
% REPORT DOCUMENT STYLE -- version 0.83 - released 13 Jan 1984
%    for LaTeX version 2.02
% Copyright (C) 1984 by Leslie Lamport

\typeout{Document Style 'boo' - 7 Jun 1984}

% CHANGES THAT SHOULD BE MADE TO REPORT:
%
%  - change \chapter, \section etc. so they work right with names more
%    than one line long.  Requires ragged-righting and turning off
%    hyphenation, as per 4 Feb 83 message from DEK.
%
\makeatletter
%    *               FONTS                  *
%    ****************************************
%

\parskip 5pt plus 2pt minus 1pt
\parindent 20pt

%  % type size commands
%  \def\baselinestretch{1.05}
%  
%  \def\normalsize{\tenpt\baselineskip\baselinestretch\baselineskip
%     \normalbaselineskip\baselineskip}
%  
%  \def\large{\twelvept\baselineskip\baselinestretch\baselineskip
%     \normalbaselineskip\baselineskip}
%  
%  \def\Large{\fourteenpt\baselineskip\baselinestretch\baselineskip
%     \normalbaselineskip\baselineskip}
%  
%  \def\LARGE{\seventeenpt\baselineskip\baselinestretch\baselineskip
%     \normalbaselineskip\baselineskip}
%  
%  \def\huge{\twentypt\baselineskip\baselinestretch\baselineskip
%     \normalbaselineskip\baselineskip}
%  
%  \def\small{\ninept\baselineskip\baselinestretch\baselineskip
%     \normalbaselineskip\baselineskip}
%  
%  \def\footnotesize{\eightpt\baselineskip\baselinestretch\baselineskip
%     \normalbaselineskip\baselineskip}
%  
%  \def\scriptsize{\sevenpt\baselineskip\baselinestretch\baselineskip
%     \normalbaselineskip\baselineskip}
%  
%  \def\tiny{\fivept\baselineskip\baselinestretch\baselineskip
%     \normalbaselineskip\baselineskip}
%  
%  
%    *            PAGE STYLES               *
%    ****************************************
%
%  To get heads and feet defined for different styles, the text 
%  to be put on the left- or right-hand page heading is defined
%  by the macro \@lhead or \@rhead.  (left-hand = even page number)
%  These can be set by the user commands \lhead, \rhead and
%  \head. 
%
%  The macros \@chapmark, \@secmark, etc. are called by \chapter, \section, 
%  etc. to make appropriate changes to the running heads.
%  \@chapmark, etc. take a single argument, which is the argument of the 
%  \chapter, etc. macro from which they're called.  
%  The page style \ps@... macros change the running heads by
%  redefining \@chapmark, etc. 

\def\head{\@ifnextchar[{\@xhead}{\@yhead}}
\def\@xhead[#1]#2{\if #1l \def\@lhead{#2}\else \def\@rhead{#2}\fi}
\def\@yhead#1{\def\@lhead{#1}\def\@rhead{#1}}

% Initial default definitions.
\def\@chapmark#1{}   
\def\@secmark#1{}
\def\@subsecmark#1{}
\def\@subsubsecmark#1{}
\def\@lhead{}  
\def\@rhead{}

% Note use of \hbox{} in case of empty heading fields in the
% following definitions of \ps@...

\def\ps@myheadings{\def\@oddhead{\sl\hbox{}\hfil\@rhead \hfil \rm\co@page}%
\def\@oddfoot{}\def\@evenhead{\rm\co@page\hfil\sl\@lhead\hfil}%
\def\@evenfoot{}\def\@chapmark##1{}\def\@secmark##1{}}

\if@twoside 
\def\ps@headings{\def\@oddfoot{}%
\def\@oddhead{\sl\hbox{}\firstmark\hfil\rm\co@page}%
\def\@evenfoot{}%
\def\@evenhead{\rm\co@page\hss\sl\@lhead\hss}%
\def\@chapmark##1{\mark{}\def\@lhead{##1}}%
\def\@secmark##1{{\let\protect\noexpand\mark{\hfil \co@section 
    \hskip 1em##1}}}}
\else
\def\ps@headings{\def\@oddhead{\sl\hbox{}\firstmark \hfil \rm\co@page}%
\def\@oddfoot{}%
\def\@chapmark##1{\mark{\@chapapp \co@chapter}}%
\def\@secmark##1{\mark{Section \co@section}}}
\fi

\def\ps@empty{\def\@oddhead{}\def\@oddfoot{}%
\def\@evenhead{}\def\@evenfoot{}}

\def\ps@plain{\def\@oddhead{}\def\@oddfoot{\rm\hfil\co@page
     \hfil}\def\@evenhead{}\let\@evenfoot\@oddfoot}

%  \let\ps@newchapter=\ps@plain
%  \thispagestyle{newchapter}

\def\ps@newchapter{\def\@oddhead{\rm\hbox{} \hfil\co@page}%
\def\@oddfoot{\sl Programming and Proving\hfil Draft \hfil \rm \Time\kern 1ex\today}%
\let\@evenhead\@oddhead\let\@evenfoot\@oddfoot}


\def\ps@boodraftheadings{%
\def\@oddhead{\rm\hbox{}\firstmark \hfil \sl \@rhead \hfil \rm\co@page}%
\def\@oddfoot{\sl Programming and Proving\hfil Draft \hfil \rm \Time\kern 1ex\today}%
\let\@evenfoot\@oddfoot
\let\@evenhead\@oddhead
\def\@chapmark##1{\mark{\co@chapter}}%
\def\@secmark##1{\mark{\co@section}}% 
}

% use \pagestyle{boodraftheadings} to get the draft headings
% use \pagestyle{headings} to get normal latex headings

%    *            SUBSTYLES                 *
%    ****************************************
%
%   SUBSTYLE draft SETS \overfullrule
%
%    
%    THE OLD SUBSTYLE heada , WHICH HAS BEEN COMMENTED OUT
%    CHANGED \pagestyle{headings} TO PRODUCE
%               6    Chapter Title    |    Section Title   7
%    IN TWO-SIDED PAGE LAYOUTS AND
%                   Chapter Title    7
%    IN SINGLE SIDE 
%

\def\ds@draft{\overfullrule 5pt}

%\def\ds@heada{\if\@twoside 
%\def\ps@headings{\def\@oddfoot{}%
%\def\@oddhead{\sl\hfil\firstmark\hfil\rm\co@page}%
%\def\@evenfoot{}%
%\def\@evenhead{\rm\co@page\hfil\sl\@lhead\hfil}%
%\def\@chapmark####1{\mark{}\def\@lhead{####1}}%
%\def\@secmark####1{{\let\protect\noexpand\mark{####1}}}}
%\else
%\def\ps@headings{\def\@oddhead{\sl\hfil\@rhead\hfil\rm\co@page}%
%\def\@oddfoot{}%
%\def\@chapmark####1{\def\@rhead{####1}}%
%\def\@secmark####1{}}
%\fi}


%    *           ENVIRONMENTS               *
%    ****************************************
%
% titlepage
%
\def\titlepage{\newpage\thispagestyle{empty}}
\def\endtitlepage{\newpage\global\c@page \@ne}

% Default values for list environment.

\def\topsepcorrection{.75}
\leftmargini 38pt
\leftmarginii 30pt
\leftmarginiii 20pt
\leftmarginiv 15pt
\leftmarginv 15pt
\leftmarginvi 10pt

\topsep 5pt
\labelsep 5pt
\tabbingsep \labelsep
\parsep 5pt
\parstretch 0pt plus 2pt minus 1pt

%minipage
\def\@minipagerestore{\let\@mpfnnumber=\@alph}


%                PARAGRAPH-FORMATTING ENVIRONMENTS
%                ---------------------------------
% VERSE
%   \CR ends line
%   Line continuations indented further.
%   Blank line makes new paragraph with \parskip space
%
%  \def\verse{\let\\=\@centercr \list{}{\itemsep\z@ 
%    \itemindent -15pt\listparindent \itemindent 
%    \rightmargin\leftmargin\advance\leftmargin 15pt}\item[]}
%  \let\endverse\endlist

% QUOTATION
%   Fills lines
%   Indents paragraph
%   
%  \def\quotation{\list{}{\listparindent 20pt\relax\itemindent\listparindent
%      \rightmargin\leftmargin}\item[]}
%  \let\endquotation=\endlist

% QUOTE -- same as quotation except no paragraph indentation,
%  \def\quote{\list{}{\rightmargin\leftmargin}\item[]}
%  \let\endquote=\endlist

%                 LIST-MAKING ENVIRONMENTS
%                 ------------------------
%
% \description : temporary definition.

%  \def\descriptionlabelwidth{.2\linewidth}
%  
%  \def\description#1{\list{#1}{\settowidth\@tempdima{#1}
%  \ifdim \@tempdima >\labelwidth 
%  \ifdim \@tempdima >\descriptionlabelwidth \@tempdima\descriptionlabelwidth\fi
%  \labelwidth\@tempdima \leftmargin\@tempdima \advance\leftmargin\labelsep
%  \else \labelwidth\@tempdima\fi}}

%  \def\enddescription{\endlist}

% PARAMETERS FOR enumerate
%
%  \let\@enumspacing\relax
%  \def\ce@enum@i{\arabic{enum@i}.}
%  \def\co@enum@i{\arabic{enum@i}}
%   
%  \def\ce@enum@ii{(\alph{enum@ii})}
%  \def\co@enum@ii{\co@enum@i\ce@enum@ii}
%   
%  \def\ce@enum@iii{\roman{enum@iii}.}
%  \def\co@enum@iii{\co@enum@ii\ce@enum@iii}
%   
%  \def\ce@enum@iv{\Alph{enum@iv}.}
%  \def\co@enum@iv{\co@enum@iii\ce@enum@iii}
%  
%  % Parameters for itemize
%  \let\@itemspacing=\relax
%  \def\item@i{$\bullet$}
%  
%  \def\item@ii{--}
%  
%  \def\item@iii{$\ast$}
%  
%  \def\item@iv{$\cdot$}
%  
%  \def\setitemtick#1#2{\expandafter\def\csname item@#1\endcsname{#2}}

%  \def\setitemitick#1{\def\item@i{#1}}
%  \def\setitemiitick#1{\def\item@ii{#1}}
%  \def\setitemiiitick#1{\def\item@iii{#1}}
%  \def\setitemivtick#1{\def\item@iv{#1}}

% Theorem environments -- use defaults

% Bibliography
\def\thebibliography#1{\beginbibliography
\list{[\@bibnum]}{\settowidth\labelwidth{[#1]}}}
\let\endthebibliography=\endlist
\def\beginbibliography{\par\pagebreak[3]
\vskip 20pt
\hbox to\hsize{\hss REFERENCES\hss}
\nobreak\vskip 10pt\relax}

\def\@lbibitem[#1]#2{\item[{[#1]}]\if@filesw \immediate\write\@auxout
       {\string\bibcite{#2}{#1}}\fi\ignorespaces}

\def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
       {\string\bibcite{#1}{\@bibnum}}\fi\ignorespaces}

% THE theindex ENVIRONMENT
%   Produces double column format.  
%   Each paragraph is a separate entry.
%
\newif\if@restonecol

\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
\columnseprule \z@
\columnsep 35pt\twocolumn[\vskip 
    30pt\centering\large INDEX\par\vskip 20pt\relax]
    \pagestyle{myheadings}\head{Index}\thispagestyle{plain}\parindent\z@
    \parskip\z@ plus .3pt\relax\let\item\@idxitem}

\def\@idxitem{\par\hangindent 40pt}

\def\subitem{\par\hangindent 40pt \hspace*{20pt}}

\def\subsubitem{\par\hangindent 40pt \hspace*{30pt}}

\def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}

\def\indexspace{\par \vskip 10pt plus 5pt minus 3pt\relax}

% Array and tabular environment parameters
\arraycolsep 5pt
\tabcolsep 6pt
\arrayrulewidth .4pt
\doublerulesep 2pt

% \fbox parameters
\fboxsep = 3pt
\fboxrule = .4pt

%    *        CHAPTERS AND SECTIONS         *
%    ****************************************
%
% Define counters
\@definecounter{chapter}
\@definecounter{section}
\@definecounter{subsection}
\@definecounter{subsubsection}

\@addtoreset{section}{chapter}
\@addtoreset{subsection}{section}
\@addtoreset{subsubsection}{subsection}

\def\co@chapter{\@Roman{\c@chapter}}
\def\co@section{\co@chapter.\@arabic{\c@section}}
\def\co@subsection{\co@section .\@arabic{\c@subsection}}
\def\co@subsubsection{\co@subsection .\@arabic{\c@subsubsection}}

% \chapter, \section, \subsection and \subsubsection
% In *-version, they don't include a section number or add a
% contents line.  In plain version, they have an optional first
% argument which is a short form to use in contents and heading.
%
% Note use of \addvspace to get proper space before and after 
% \section even when followed immediately by \subsection or preceded by 
% \chapter, and use of @nobreak with \everypar to avoid page breaks.

\def\@chapapp{Chapter} % changed to 'Appendix' by \appendix

\def\chapter{\clearpage
   \global\@topnum\z@                   % no figures at top of page
  \@ifstar{\@schapter}{\@dblarg\@chapter}}

\def\@chapter[#1]#2{\@refstepcounter{chapter}
   \typeout{\@chapapp\space\the\c@chapter.}
   \thispagestyle{newchapter}
   \@chapmark{#1}                       % set mark for page heading
   \head{#1}                            % set header for page heading
   \addcontentsline{toc}{chapter}{\protect
        \makebox[1.5em][l]{\co@chapter.}#1}     
 \addtocontents{lof}{\protect\addvspace{10pt}} % add between-chapter space
 \addtocontents{lot}{\protect\addvspace{10pt}} % to lists of figs & tables
\if@twocolumn \@topnewpage[\vskip 50pt
                \parindent\z@ \huge \raggedright
                \@chapapp{} \co@chapter.
                \par \vskip 20pt #2\vskip 40pt]
  \else  \vbox{\vskip 30pt
              \parindent\z@ \Large \raggedright
              \@chapapp{} \co@chapter.
              \quad #2}\vskip 30pt\relax\fi}

\def\@schapter#1{\if@twocolumn \@topnewpage[\vskip 50pt
                \parindent\z@ \huge \raggedright
                #1\vskip 40pt]
  \else    \head{#1}                            % set header for page heading
           \vbox{\vskip 30pt
              \parindent\z@ \Large \raggedright
              #1}\vskip 30pt\relax\fi}

\def\section{\par  % @nobreak true if right after \chapter
   \if@nobreak \else \pagebreak[3]
     \addvspace{25pt} \fi          
     \@ifstar{\@ssection}{\@dblarg\@section}}

\def\@section[#1]#2{\@refstepcounter{section} 
   \vbox{\large\bf\@hangfrom{\co@section.\hskip 10pt}#2}
   \@secmark{#1}
   \addcontentsline{toc}{section}{\protect\makebox[2.3em][l]{\co@section.}#1}
   \@xsection}

\def\@xsection{\nobreak
   \global\@nobreaktrue
   \vskip 10pt
   \everypar{\global\@nobreakfalse\everypar{}}}

\def\@ssection#1{\vbox{\large\bf\noindent #1}\@xsection}

\def\subsection{\par  
   \if@nobreak \else \pagebreak[3]
     \addvspace{15pt} \fi          
     \@ifstar{\@ssubsection}{\@dblarg\@subsection}}

\def\@subsection[#1]#2{\@refstepcounter{subsection} 
   \vbox{\normalsize\bf\@hangfrom{\co@subsection.\hskip 10pt}#2}
   \addcontentsline{toc}{subsection}{\protect
           \makebox[3.2em][l]{\co@subsection.}#1}
   \@xsubsection}

\def\@xsubsection{\nobreak
   \global\@nobreaktrue
   \vskip 5pt
   \everypar{\global\@nobreakfalse\everypar{}}} 

\def\@ssubsection#1{\vbox{\normalsize\bf\noindent #1}\@xsubsection}

\def\subsubsection{\par  % @nobreak true if right after \chapter
   \if@nobreak \else \pagebreak[3]
     \addvspace{15pt} \fi          
     \@ifstar{\@ssubsubsection}{\@dblarg\@subsubsection}}

\def\@subsubsection[#1]#2{\@refstepcounter{subsubsection} 
   \vbox{\normalsize\bf\@hangfrom{\co@subsubsection.\hskip 10pt}#2}
   \addcontentsline{toc}{subsubsection}{\protect
      \makebox[4.1em][l]{\co@subsubsection.}#1}
   \@xsubsubsection}

\def\@xsubsubsection{\nobreak
   \global\@nobreaktrue
   \vskip 5pt
   \everypar{\global\@nobreakfalse\everypar{}}}

\def\@ssubsubsection#1{\vbox{\normalsize\bf\noindent #1}\@xsubsubsection}


\def\@hangfrom#1{\setbox\@tempboxa=\hbox{#1}
      \hangindent 1\wd\@tempboxa\noindent\box\@tempboxa}


% Table of contents

\def\begintableofcontents{\par\hbox to\columnwidth{\hss
   \large CONTENTS\hss}\vskip 20pt\relax}

\def\tableofcontents{\begintableofcontents
\makeatletter  
\@input{\jobname.toc}     
  \if@filesw \newwrite\tf@toc \openout\tf@toc=\jobname.toc  \fi
  \makeatother}

% Macros to produce table of contents lines

\def\l@chapter#1#2{\pagebreak[3]
  \vskip 1.0em plus 1pt\def\@secsk{T}\hbox to \columnwidth
      {\bf #1\hfill \hbox to 2em{\hfil #2}}\nobreak} 

% Note braces around argument #2 to keep declarations local.

\def\@toclines#1#2#3{\vskip \z@ plus .2pt
  \hbox to \columnwidth{\hskip #1\relax {#2}\@lead\hbox to 1.5em{\hfil #3}}}

\def\l@section{\@toclines{1.5em}}
\def\l@subsection{\@toclines{3.8em}}
\def\l@subsubsection{\@toclines{7em}}
\def\@lead{\leaders\hbox to .9em{\hfill.\hfill}\hfill}

%    *             APPENDIX                 *
%    ****************************************
%
% The \appendix command must do the following:
%    -- reset the chapter counter to zero
%    -- set \@chapapp to Appendix (for messages)
%    -- redefine the chapter counter to produce appendix numbers
%    -- reset the section counter to zero
%    -- redefine the \chapter command if appendix titles and headings are
%       to look different from chapter titles and headings.

\def\appendix{\setcounter{chapter}{0}\setcounter{section}{0}\def\@chapapp%
{Appendix}\def\co@chapter{\@Alph\c@chapter}}

%    *             FOOTNOTES                *
%    ****************************************
%

\footnotesep 11pt
\skip\footins 2pt

\def\footnoterule{\kern-1\p@
  \hrule width .4\columnwidth \kern .6\p@} % the \hrule is .4pt high

\@addtoreset{footnote}{chapter}
\let\@footnotenumber\@arabic

\long\def\@makefntext#1#2{\noindent\hangindent 5pt\hbox 
    to 5pt{\hss $↑{#1}$}\vrule \@height \footnotesep \@width \z@ #2\strut}

\def\@makefnmark#1{\hbox{$↑{#1}$}}

%  equation -- must follow \chapter definition

\@addtoreset{equation}{chapter}
\def\co@equation{\co@chapter.\@arabic{\c@equation}}

%    *         FIGURES AND TABLES           *
%    ****************************************
% 
% Float placement parameters
\c@topnumber=2
\def\topfraction{.7}
\c@bottomnumber=1
\def\bottomfraction{.3}
\c@totalnumber=3
\def\textfraction{.2}
\def\floatpagefraction{.5}
\c@dbltopnumber= 2
\def\dbltopfraction{.7}
\def\dblfloatpagefraction{.5}

\long\def\@caption#1{\@ifnextchar[{\@xcaption{#1}}{\@ycaption{#1}}}
\long\def\@ycaption#1#2{\@xcaption{#1}[#2]{#2}}

\long\def\@xcaption#1[#2]#3{\addcontentsline{\@nameuse
  {ext@#1}}{figure}{\csname fnum@#1\endcsname. #2}
  \par\vskip 10pt \setbox\@tempboxa\hbox{\rm
   \csname fnum@#1\endcsname: \ignorespaces #3}\ifdim \wd\@tempboxa >\hsize
     \unhbox\@tempboxa\par
   \else\hbox to\hsize{\hfil\box\@tempboxa\hfil}\fi}

\@definecounter{figure}
\@addtoreset{figure}{chapter}
\def\co@figure{\co@chapter.\@arabic\c@figure}

\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{Figure \co@figure}
\def\figure{\@float{figure}}
\let\endfigure\end@float
\@namedef{figure*}{\@dblfloat{figure}}
\@namedef{endfigure*}{\end@dblfloat}

\def\beginlistoffigures{\par\hbox to\columnwidth{\hss
   \large FIGURES\hss}\vskip 20pt\relax}

\def\listoffigures{\beginlistoffigures
  \makeatletter
  \@input{\jobname.lof}     
  \if@filesw \newwrite\tf@lof \openout\tf@lof=\jobname.lof  \fi
   \makeatother}

\def\l@figure{\@toclines\z@}

\@definecounter{table}
\@addtoreset{table}{chapter}
\def\co@table{\co@chapter.\@arabic\c@table}

\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{Table \co@table}
\def\table{\@float{table}}
\let\endtable\end@float
\@namedef{table*}{\@float{table}}
\@namedef{endtable*}{\end@float}

\def\beginlistoftables{\par\hbox to\columnwidth{\hss
   \large TABLES\hss}\vskip 20pt\relax}

\def\listoftables{\beginlistoftables \makeatletter
  \@input{\jobname.lot}     
  \if@filesw \newwrite\tf@lot \openout\tf@lot=\jobname.lot  \fi\makeatother}

%    *           INITIALIZATION             *
%    ****************************************
%
% Default initializations

\ps@plain
\pagenumbering{arabic}
\onecolumn
\makeatother